<?php

/*************************************************************************
Module static
----------------------------------------------------------------
Avasoft CMS Project
Company: Avasoft Co., Ltd                                  
Name: Tran Thi Kim Que                                   
Last updated: 08/03/2011
**************************************************************************/
//ini_set('display_errors','1'); ini_set('display_startup_errors','1');
include_once(ROOT_PATH."classes/dao/static.class.php");
$static = new StaticPage();
$templateFile = "static.tpl.html";
$slug = $request->element('slug','');
$staticItem = $static->getStaticPageFromSlug($slug,$lang);
if($staticItem){
	$title=$staticItem->getTitle();	
	$template->assign("title",$title);
	$template->assign("pageName",$title);
	$template->assign("static",$static);
	$template->assign("staticItem",$staticItem);
}else{
	$staticItems=$static->getObjects(1,"status=1",'',1);
	$template->assign("static",$static);
	$template->assign("staticItems",$staticItems);
	$pageName=$messages["linkgt"];
	$template->assign("pageName",$pageName);
}
$template->assign("slug",$slug);	

// Code chung toan he thong
include_once(ROOT_PATH."modules/framework.module.php");
 
 $active='gioi-thieu';
 $template->assign('active',$active);

?>